// history模式

// createWebHashHistory hash模式
// createWebHistory  history模式
import {
    createRouter,
    createWebHistory,
} from 'vue-router'
const routes = [
    // 路由的默认路径
    {
        path: '/',
        name: 'home',
        component: () =>import('../qimo/zi/Home.vue'),
        redirect:{name: 'Login'},
        children:[{
          path: '/Login',
          name: 'Login',
          component: () =>import('../qimo/dengluzhuce/Login.vue'),
          
        },
          {
            path: '/Register',
            name: 'Register',
            component: () =>import('../qimo/dengluzhuce/Register.vue'),
          }
        ]
      },
      {
        path: '/about',
        name: 'about',
        component: () =>import('../qimo/zi/About.vue'),
        redirect:{name: 'shouye'},
        children:[{
          path: '/shouye',
          name: 'shouye',
          component: () =>import('../qimo/guanli/shouye.vue'),
          // component: () =>import('../qimo/guanli/yingyue.vue'),
        },{
          path: '/yonghugaunli',
          name: 'yonghugaunli',
          component: () =>import('../qimo/guanli/yonghugaunli.vue'), 
        },{
          path: '/yulanye',
          name: 'yulanye',
          component: () =>import('../qimo/guanli/yulanye.vue'), 
      }]
      }
]
// 创建路由对象
const router = createRouter({
    history: createWebHistory(),
    routes
})
export default router;